package com.gxa.saas.portal.mapper;

import com.gxa.saas.core.entity.TbAddress;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Auther: pengxtao
 * @Date: 2022/7/23下午11:29
 */
@Mapper
public interface PlaceOrderMapper {

    @Select("SELECT ta.ad_name AS adName,ta.ad_phone AS adPhone,ta.ad_address AS adAddress, ta.ad_detail AS adDetail,ta.ad_status AS adStatus \n" +
            "FROM\n" +
            " user u,\n" +
            " tb_address ta \n" +
            " WHERE ta.user_id = u.id AND ta.user_id = #{userId} ")
    public List<TbAddress> selectAddress(@Param("userId") String userId);
}
